# -*- codeing =utf-8 -*-
# @Time : 2022/9/15 上午9:41
# @Author :WXJ
# @File : 4.1.py
# @Software: PyCharm
class Cat:
     name="buo"
     tili=100

     def __init__(self,name,tili):
         self.name=name
         self.tili=tili

     def play(self):
         self.tili -=10
         print("%s体力会减少为%d" % (self.name, self.tili))
     def sleep(self):
         self.tili+=10
         print("%s补充体力增加为%d"%(self.name, self.tili))

cat1=Cat("土猫",20)
cat1.play()
cat1.sleep()